import _axios from '@/assets/js/http'

// 通过输入的条码查询信息
export const getInfoByCode = barcode => {
    let config = {
        url: api.supplier + '/sapGoodsInfo/getByCode',
        // url: 'api/sapGoodsInfo/getByCode',
        method: 'GET',
        params: {
            code: barcode
        },
        headers: {
            "Content-Type": 'application/json', 'Accept': 'application/json'
        }
    }
    return _axios(config)
}
// 标记合格
export const setPass = param => {
    let config = {
        url: api.supplier + '/supplierQualityRecord',
        // url: 'api/supplierQualityRecord',
        method: 'POST',
        data: JSON.stringify(param),
        headers: {
            "Content-Type": 'application/json', 'Accept': 'application/json'
        }
    }
    return _axios(config)
}
// 获取不良原因列表
export const getBadReason = () => {
    let config = {
        url: api.supplier + '/supplierBadReason/getTypeDetail',
        // url: 'system/supplierBadReason/getTypeDetail',
        method: 'GET',
        headers: {
            "Content-Type": 'application/json', 'Accept': 'application/json'
        }
    }
    return _axios(config)
}